using System;
using UnityEngine;

namespace DebugTools
{
	static class DebugTool : object
	{
		public static void drawCircle(Vector3 pos, float radius, Color colour) {
			const int pointsInCircle = 20;
			for (int i = 0; i < pointsInCircle; i++)
			{
				Vector3 thisPointOnCircle = new Vector3(0.0f, pos.y, 0.0f);
				thisPointOnCircle.x = pos.x + radius * (float)Math.Sin( (Math.PI/180) * (i*(360/pointsInCircle)));
				thisPointOnCircle.z = pos.z + radius * (float)Math.Cos( (Math.PI/180) * (i*(360/pointsInCircle)));
				
				Vector3 nextPointOnCircle = new Vector3(0.0f, pos.y, 0.0f);
				nextPointOnCircle.x = pos.x + radius * (float)Math.Sin( (Math.PI/180) * ((i+1)*(360/pointsInCircle)));
				nextPointOnCircle.z = pos.z + radius * (float)Math.Cos( (Math.PI/180) * ((i+1)*(360/pointsInCircle)));
				
				Debug.DrawLine(thisPointOnCircle, nextPointOnCircle, colour);
			}	
		}
	}
}

